<div class="row">
  <div class="col-lg-8">
    <div class="panel panel-primary">
      <div class="panel-heading">系统配置</div>
      <div class="panel-body" ng-init="send('config.index', {})">
        <p>平台参数的设置。
          <a class="pull-right" ui-sref="setting.config.create" title="新增加配置"><i class="fa fa-plus-square-o fa-2x"></i></a>
        </p>

        <div class="row">
          <div class="col-lg-10 pull-right">
            <div ui-view></div>
          </div>
        </div>

        <div ng-switch on="config_index.length">
          <p class="text-warning" ng-switch-when="0">
            <i class="fa fa-exclamation-circle fa-4x"></i>
            <span>
              目前系统配置还没有任何参数，通过点击右上方的 <i class="fa fa-plus-square-o fa-2x"></i> 号设置您的参数。
            </span>
          </p>

          <div ng-switch-default>
            <table class="table">
              <tr ng-repeat="e in config_index">
                <td style="width: 5%"><i class="fa fa-info-cycle fa-1x"></i></td>
                <td style="width: 20%"><b>{{e.key}}</b></td>
                <td style="width: 30%">{{e.value}}</td>
                <td>{{e.descr}}</td>
                <td>
                  <small ng-show="{{e.mustbe == 'false'}}">
                    <a href ng-click="send('config.destroy', {id: e.key});">
                      <i class="fa fa-minus-circle fa-1x text-danger pull-right"></i>
                    </a>
                  </small>

                  <small>
                    <a ui-sref="setting.config.edit(e)">
                      <i class="fa fa-edit fa-1x text-warning pull-right"></i>
                    </a>
                  </small>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
